<?php

/**
 * @BelongProject: flami_mangers
 * @Author: Zwc
 * @CreateTime: 2025-11-01 19:42:27
 * @Description: TODO
 */

namespace App\Domain;

use function PhalApi\DI;

class LevelAnchorDomain
{
    /**
     * 获取所有的主播等级
     * @param $langId
     * @return mixed
     */
    public static function getLevelAnchorData($langId)
    {
        $where = 'del_flag = 0 and lang_id = ' . $langId;

        $dataList = DI()->notorm->level_anchor->select("id,level,levelname,level_up,thumb,secret_photo,secret_video,telephone")
            ->where($where)
            ->order('level asc')
            ->fetchAll();

        foreach ($dataList as &$val) {
            $val['thumb'] = \App\get_upload_path($val['thumb']);
        }
        return $dataList;
    }
}